import React from "react";
//3. 导入
import { useContext } from "react";
import {context} from './A';

export default function C() {
  //4. 调用 useContext
  let [count, setCount] = useContext(context);
  return (
    <div>
      <div>C</div>
      <h1>{count}</h1>
      <button onClick={() => {setCount((count + 1) * 10)}}>新增</button>
    </div>
  );
}
